// @ts-ignore
/* eslint-disable */
import request from '@/request/http'

/** 修改 修改UpdateVO中不为空的字段 PUT /baseOrg */
export async function update3(body: API.BaseOrgUpdateVO, options?: { [key: string]: any }) {
  return request<API.RBaseOrg>(`/base/baseOrg`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 新增 POST /baseOrg */
export async function save3(body: API.BaseOrgSaveVO, options?: { [key: string]: any }) {
  return request<API.RBaseOrg>(`/base/baseOrg`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 删除 DELETE /baseOrg */
export async function delete3(body: number[], options?: { [key: string]: any }) {
  return request<API.RBoolean>(`/base/baseOrg`, {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 单体查询 单体查询 GET /baseOrg/${param0} */
export async function get3(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.get3Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.RBaseOrgResultVO>(`/base/baseOrg/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {})
  })
}

/** 检测名称是否可用 GET /baseOrg/check */
export async function check2(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.check2Params,
  options?: { [key: string]: any }
) {
  return request<API.RBoolean>(`/base/baseOrg/check`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 清理缓存 清理缓存 POST /baseOrg/clearCache */
export async function clearCache1(body: number[], options?: { [key: string]: any }) {
  return request<API.RBoolean>(`/base/baseOrg/clearCache`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 复制 POST /baseOrg/copy */
export async function copy3(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.copy3Params,
  options?: { [key: string]: any }
) {
  return request<API.RBaseOrg>(`/base/baseOrg/copy`, {
    method: 'POST',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 查询单体详情 GET /baseOrg/detail */
export async function getDetail3(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getDetail3Params,
  options?: { [key: string]: any }
) {
  return request<API.RBaseOrgResultVO>(`/base/baseOrg/detail`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 根据Id批量查询 根据Id批量查询 POST /baseOrg/findByIds */
export async function findByIds3(body: number[], options?: { [key: string]: any }) {
  return request<API.RListBaseOrgResultVO>(`/base/baseOrg/findByIds`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 查询员工的公司 GET /baseOrg/findCompanyByEmployeeId */
export async function findCompanyByEmployeeId(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.findCompanyByEmployeeIdParams,
  options?: { [key: string]: any }
) {
  return request<API.RListBaseOrg>(`/base/baseOrg/findCompanyByEmployeeId`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 查询员工{employeeId}的在指定公司{companyId}下的所有部门 GET /baseOrg/findDeptByEmployeeId */
export async function findDeptByEmployeeId(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.findDeptByEmployeeIdParams,
  options?: { [key: string]: any }
) {
  return request<API.RListBaseOrg>(`/base/baseOrg/findDeptByEmployeeId`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 查询所有部门信息 GET /baseOrg/findOrgByTenantId */
export async function findOrgByTenantId(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.findOrgByTenantIdParams,
  options?: { [key: string]: any }
) {
  return request<API.RListBaseIdNameResultVO>(`/base/baseOrg/findOrgByTenantId`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 查询机构的角色 GET /baseOrg/findOrgRoleByOrgId */
export async function findOrgRoleByOrgId(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.findOrgRoleByOrgIdParams,
  options?: { [key: string]: any }
) {
  return request<API.RListLong>(`/base/baseOrg/findOrgRoleByOrgId`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 给机构分配角色 给机构分配角色 POST /baseOrg/orgRole */
export async function saveOrgRole(
  body: API.BaseOrgRoleRelSaveVO,
  options?: { [key: string]: any }
) {
  return request<API.RListLong>(`/base/baseOrg/orgRole`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 分页列表查询 POST /baseOrg/page */
export async function page3(
  body: API.PageParamsBaseOrgPageQuery,
  options?: { [key: string]: any }
) {
  return request<API.RIPageBaseOrgResultVO>(`/base/baseOrg/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 批量查询 批量查询 POST /baseOrg/query */
export async function query3(body: API.BaseOrgPageQuery, options?: { [key: string]: any }) {
  return request<API.RListBaseOrgResultVO>(`/base/baseOrg/query`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 刷新缓存 刷新缓存 POST /baseOrg/refreshCache */
export async function refreshCache1(body: number[], options?: { [key: string]: any }) {
  return request<API.RBoolean>(`/base/baseOrg/refreshCache`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 按树结构查询地区 POST /baseOrg/tree */
export async function tree(body: API.BaseOrgPageQuery, options?: { [key: string]: any }) {
  return request<API.RListBaseOrgResultVO>(`/base/baseOrg/tree`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}
